/*
 * Copyright 2008-2015 GuanAiHui inc. 
 */
package com.pretty.adminapp.pojo.model.um;

import com.pretty.adminapp.pojo.base.AutoIdBaseEntity;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.*;

/**
 * EmployeeRole:
 *
 * @author Dennis Ge
 */
@Entity
@Table(name = "um_employee_role")
@DynamicInsert
@DynamicUpdate
public class EmployeeRole extends AutoIdBaseEntity {

	@Column(name = "employee_Id")
	private Long employeeId;

	@Column(name = "role_id")
	private Long roleId;

	@ManyToOne
	@JoinColumn(name = "role_id", insertable = false, updatable = false)
	private Role role;

	public Long getEmployeeId() {
		return employeeId;
	}

	public void setEmployeeId(Long employeeId) {
		this.employeeId = employeeId;
	}

	public Long getRoleId() {
		return roleId;
	}

	public void setRoleId(Long roleId) {
		this.roleId = roleId;
	}

	@Override
	public String toString() {
		return "EmployeeRole [employeeId=" + employeeId + ", roleId=" + roleId + "]";
	}

}
